<template>
<el-dialog
  title="详情"
  :visible.sync="dialogVisible"
  width="30%"
  :before-close="handleClose">
<!-- 表单 -->
 <div style="margin: 20px;"></div>
 <el-form :label-position="labelPosition" label-width="80px" :model="formLabelAlign">
  <el-form-item label="编号">
    <el-input v-model="formLabelAlign.id"></el-input>
  </el-form-item>
  <el-form-item label="上报单位">
    <el-input v-model="formLabelAlign.unit"></el-input>
  </el-form-item>
  <el-form-item label="值班日期">
    <el-input v-model="formLabelAlign.workDate"></el-input>
  </el-form-item>
  <el-form-item label="上报时间">
    <el-input v-model="formLabelAlign.date"></el-input>
  </el-form-item>
  <el-form-item label="道路">
    <el-input v-model="formLabelAlign.road"></el-input>
  </el-form-item>
  <el-form-item label="路况">
     <el-select v-model="formLabelAlign.condition" placeholder="请选择道路状况" disabled>
      <el-option label="请选择" value=""></el-option>
      <el-option label="畅通" :value="0"></el-option>
      <el-option label="缓慢" :value="1"></el-option>
      <el-option label="拥堵" :value="2"></el-option>
    </el-select>
  </el-form-item>
  </el-form>

  <span slot="footer" class="dialog-footer">
    <el-button type="primary" @click="dialogVisible = false">关闭</el-button>
  </span>
</el-dialog>
</template>

<script>
import eventBus from '../../../untial/evevtBus'
export default {
  data() {
      return {
        dialogVisible: false,
        labelPosition: 'right',
        formLabelAlign: { }
      };
    },
    mounted() {
      eventBus.$on('handleShowFun',this.ShowFun)
    },
     methods: {
      ShowFun(val){
        this.formLabelAlign=val
        console.log(this.formLabelAlign);
        this.dialogVisible=true
      },
       handleClose(done) {
        this.$confirm('确认关闭？')
          .then(_ => {
            done();
          })
          .catch(_ => {});
      }
    }

}
</script>

<style>

</style>